Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-1102 Adaptive marshaller buffer sizes #338

Closed
wants to merge 1 commit into from

Conversation

galderz
Copy link
Member

@galderz galderz commented May 23, 2011

https://issues.jboss.org/browse/ISPN-1102

Use an adaptive buffer algorithm based on Netty's adaptive buffer size predictor. Byte buffers that are way off are trimmed as well, but the trimming is limited to way off predictions, so extra memory should be small.

* @param previousSize int representing the size of the last
* object buffered.
*/
void calculateNextSize(int previousSize);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about recordSize(size) instead? calculateNextSize(size) makes it seem like the next size will only depend on the size passed in.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're right. calculateNextSize() is an implementation detail. I like recordSize() name.

@galderz galderz closed this May 25, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants